Implementing the test cases for POUs

This article is also about the workflow phase "module implementation". (info)  This phase applies to an application and a library.

Parallelly with the implementation of the POUs, a test case for each POU provides evidence that the created POU complies with the existing requirements and that its implementation contains neither undesired functionalities nor undesired properties.
The test cases are created in Neuron Power Engineer. They are the base for the SiL-test and for the PiL-test.

In case of the LVL-workflow, this phase can be omitted, if you comply with all warnings and/or notes as listed under "Recommendations for LVL-workflow".

How to implement test cases per →POU ((warning) See warning 1 and warning 2):

  1. Make sure that the Neuron Power Engineer project containing the POU is compliant with

  2. the conditions described under: Neuron Power Engineer user documentation, "Preparing an existing project for tests"

  3. the restrictions for Neuron Power Engineer(warning) See Warning 3.

  4. In the Neuron Power Engineer project create a test suite for the POU. Details: See Neuron Power Engineer user documentation, "Creating a test suite"

  5. Enter the test data for the POU within this test suite. See Neuron Power Engineer user documentation, "Modifying the Excel test suite, creating the test suite required for test execution"
    (info) Neuron Power Engineer recommends to enter the requirements for the test case within this test suite. If you do not, the test report of the →SiL-test will not list the covered requirements.

  6. Import the test suite into the project. See Neuron Power Engineer user documentation, "Modifying the Excel test suite, creating the test suite required for test execution" as well.

Warning 1

For POUs for which the LVL workflow is not applicable, test cases per POU are the base for the mandatory SiL test as well as for the mandatory PiL test.

Observe the following:

Neuron Power Engineer must only be used for developing safety-relevant applications and libraries for them when using a full functional safety management (FSM) process and appropriate fault avoiding measures for the target SIL/ASIL.
This includes module tests with 100% branch coverage, integration and system test or other equally effective measures (see "Recommendations for LVL-workflow" when applying the LVL-workflow).

Regardless of the applied workflow, it is imperative to validate the application. The reason for this is that Neuron Power Engineer is used on an unsafe PC. As a consequence, errors in the hardware or the system environment might lead to errors in the application.

Warning 2

Only qualified code must be used when developing a library. Qualified code means that the code is tested in the context of block tests (see "SiL-test: Testing the POUs on the PC" and "PiL-test: Testing the POUs on the PLC"). 

Warning 3

When implementing the test cases for the application or library, mind all restrictions when using Neuron Power Engineer . See the article "Restrictions for the application" of the "logi.µSRTS safety manual" and the article "List of unsupported and restricted elements" of the documentation "Safety instructions on working with the IDE ".